/**
  ******************************************************************************
  * @file    Project/STM32F10x_StdPeriph_Template/main.c 
  * @author  MCD Application Team
  * @version V3.5.0
  * @date    08-April-2011
  * @brief   Main program body
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  ******************************************************************************
  */  

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include "./led/led.h"
#include "./usart/usart.h"
#include "sys.h"
#include "./i2c/i2c.h"
#include "OLED.h"



/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
	delay_init();
	led_init();
	usart1_init(115200);
	i2c_init();
	OLED_Init();
	
	OLED_Clear();
	OLED_ShowChar(0, 0, 'J', 16);
	OLED_ShowChar(8, 1, 'I', 12);
	OLED_ShowString(0, 2, "Ikun", 16);
//	OLED_ShowNum(0,4,2023,16);
//	OLED_ShowNum_RightAlign(0,6,1232023,8,16);
	OLED_ShowChinese(0,4,0,16);
	OLED_ShowChinese(16,4,1,16);
	OLED_ShowChinese(32,4,2,16);
	OLED_ShowChinese(48,4,3,16);
//	OLED_ShowChinese(64,0,0,32);
//	OLED_ShowChinese(96,0,1,32);
//	OLED_ShowChinese(64,4,2,32);
//	OLED_ShowChinese(96,4,3,32);
	OLED_ShowChinese(64,0,0,24);
	OLED_ShowChinese(88,0,1,24);
	OLED_ShowChinese(64,3,2,24);
	OLED_ShowChinese(88,3,3,24);
	/* Infinite loop */
	while (1)
	{
		LED0(0);
//		OLED_On();
		delay_ms(15);
		LED0(1);
//		OLED_Clear();
		delay_ms(15);	
	}
}






/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
